package com.jp.knowledge.view.experience;

import com.anarchy.classify.simple.widget.BagDrawable;

import java.lang.reflect.Field;

/**
 * Created by 528787067@qq.com on 2017/2/9.
 */

public class ExperienceBagDrawable extends BagDrawable {

    private float radius = 10;
    private int centerColor = 0xFFE0E0E0;
    private int edgeColor = centerColor;

    public ExperienceBagDrawable(int outlinePadding) {
        super(outlinePadding);
        try {
            Field mRadiusField = BagDrawable.class.getDeclaredField("mRadius");
            mRadiusField.setAccessible(true);
            mRadiusField.set(this, radius);
            mRadiusField.setAccessible(false);
            Field mCenterColorField = BagDrawable.class.getDeclaredField("mCenterColor");
            mCenterColorField.setAccessible(true);
            mCenterColorField.set(this, centerColor);
            mCenterColorField.setAccessible(false);
            Field mEdgeColorField = BagDrawable.class.getDeclaredField("mEdgeColor");
            mEdgeColorField.setAccessible(true);
            mEdgeColorField.set(this, edgeColor);
            mEdgeColorField.setAccessible(false);
        } catch (Exception e) {
            return;
        }
    }
}
